$(function() {
	admin.userSuggest.init();
});
Namespace('admin.userSuggest', {
	init : function() {
		easyui.util.initDatagrid('#datagrid', {
			onDblClickRow : function() {
			}
		});
	},
	query : function() {
		if (!$('#query-form').form('validate'))
			return;
		var data = $('#query-form').form('jsonObject');
		$('#datagrid').datagrid('load', data);
	},
	detail:function(id) {
		if (id != null) {
            top.addTab(id,'userSuggest详情', contextPath+'/user/suggest/detail?id=' + id);
        }
	},
	addImg:function(id){
		getDialog('query-dialog').dialog({
			href:contextPath+'/user/suggest/replay/imgUpload',
			title: '选择文件',
		    width: 350,
		    height: 250,
		    buttons:[{
				text:'上传',
				handler:function(){
					uploaderStart(id);
				}
			}]
		});
		
	},
});